From cab28759e7a22dce54f9ea12fc09556342c4b387 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 27 Jan 2003 18:00:44 +0000 Subject: [PATCH] Make slightly more C++ friendly. --- queue.c | 10 +++++----- queue.h | 2 +- route.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/queue.c b/queue.c index 1cb6e6efb..db3c56e6e 100644 --- a/queue.c +++ b/queue.c @@ -22,12 +22,12 @@ #include "queue.h" void -enqueue(queue *new, queue *old) +enqueue(queue *new_el, queue *old) { - new->next = old->next; - new->prev = old; - old->next->prev = new; - old->next = new; + new_el->next = old->next; + new_el->prev = old; + old->next->prev = new_el; + old->next = new_el; } queue * diff --git a/queue.h b/queue.h index 84bce2a56..b6b46bceb 100644 --- a/queue.h +++ b/queue.h @@ -24,7 +24,7 @@ typedef struct queue { struct queue *prev; } queue; -void enqueue(queue *new, queue *old); +void enqueue(queue *new_el, queue *old); queue * dequeue(queue *element); #define QUEUE_INIT(head) (head)->next = (head)->prev = head diff --git a/route.c b/route.c index 8a8ea03fc..dac5c4909 100644 --- a/route.c +++ b/route.c @@ -33,7 +33,7 @@ route_head * route_head_alloc(void) { route_head *rte_head; - rte_head = xcalloc(sizeof (*rte_head), 1); + rte_head = (route_head *) xcalloc(sizeof (*rte_head), 1); QUEUE_INIT(&rte_head->Q); return rte_head; } -- 2.30.2